3 enum SFXKeys
{ Hover
= 0, Click
= 1 };
7 std::cout
<< "intit\n";
9 Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT
, 2, 2000);
15 for (int i
= 0; i
< gameSFX
->size(); i
++) {
16 Mix_FreeChunk(gameSFX
->at(i
));
21 void SFX::playSFX(int track
) {
22 Mix_PlayChannel(-1, gameSFX
->at(track
), 0);
26 bool SFX::isFinished(int channel
) {
30 void SFX::setVolume(int level
) {
31 int size
= gameSFX
->size();
32 for (int i
= 0; i
< size
; i
++) {
33 if (gameSFX
->at(i
) == NULL
) {
34 std::cout
<< "miss\n";
37 std::cout
<<Mix_VolumeChunk(gameSFX
->at(i
), MIX_MAX_VOLUME
* level
/ 4)<<"- SFX Volume Level\n";